<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>升舱updateCabin </title>
	</head>
	<link rel="stylesheet" href="../css/common.css" />
	<style>
		#main{
			width:340px;
			height:200px;
			text-align:right;
		}
		#main p:nth-of-type(1){
			margin-top:15px;
		}
		#main input{
			border:1px solid #e6e6e6;
			border-radius:2px;
			width:200px;
			height:24px;
			margin-top:10px;
			outline:none;
			margin-left:5px;
			padding-left:5px;
		}
		#btnBox{
			text-align:center;
			margin-top:35px;
		}
		button{
			width:90px;
			height:28px;
			background:#00aa98;
			border:none;
			color:white;
			cursor:pointer;
			margin:0 20px;
		}
	</style>
	<body>
		<div id='main'>
			<p>旅客姓名:<span><input class='passengerName' type='text'/></span></p>
			<p>证件号码:<span><input class='certificateNumber' type='text'/></span></p>
			<p>单价:<span><input class='priceUnit' type='text'/></span></p>
			<p>新舱位:<span><input class='cabin' type='text'/></span></p>
			<!-- <p>新票号:<span><input class='ticketNumber' type='text'/></span></p> -->
			<p>备注:<span><input class='remarks' type='text'/></span></p>
		</div>		
		<div id='btnBox'>
			<button class='sure'>确定</button>
			<button class='cancle'>取消</button>
		</div>
	</body>
		<script type="text/javascript" src="../js/jquery-1.12.4.js" ></script>
		<script type="text/javascript" src="../layer-v2.4/layer/layer.js" ></script>
		<script type="text/javascript" src="../js/common.js" ></script>
		<script>
			$(".sure").click(function(){
				var json = {};
				json.orderId = parent.$(".orderNo").text();
				json.passengerName = $(".passengerName").val();
				json.certificateNumber = $(".certificateNumber").val();
				json.priceUnit = $(".priceUnit").val();
				json.cabin = $(".cabin").val();
/* 				json.ticketNumber = $(".ticketNumber").val(); */
				json.remarks = $(".remarks").val();
				layer.msg('升舱中...', {icon: 16,shade: 0.01});
				$.ajax({
					type:"post",
					url:"../orderAddon/addExch?temp="+Math.random(),
					contentType:'application/json;charset=utf-8',
					data:JSON.stringify(json),
					async:true,
					success:function(data){
						data = JSON.parse(data)
						if(data.status=="1001"){
							layer.msg('升舱成功', {icon: 1,time:1000},function(){
								closeWin()
							});			
						}else{							
							layer.alert("升舱失败——"+data.message);
						}
					}
				});
			})
			$(".cancle").click(function(){
				closeWin()
			})
		</script>			
</html>
